<template>
  <div class="home-view">
    <h1>OpenLayers 地图演示系统</h1>
    <p>欢迎使用OpenLayers地图演示系统！选择下方或上方导航栏的功能开始体验。</p>
    
    <div class="features-grid">
      <router-link to="/GeoServerService" class="feature-card">
        <div class="feature-icon">📌</div>
        <h3>WFS添加要素</h3>
        <p>在地图上绘制点并上传到GeoServer</p>
      </router-link>
      
      <router-link to="/basic-map" class="feature-card">
        <div class="feature-icon">🗺️</div>
        <h3>基础地图</h3>
        <p>基础的OpenLayers地图展示</p>
      </router-link>
      
      <router-link to="/turf-analysis" class="feature-card">
        <div class="feature-icon">🏛️</div>
        <h3>地图空间分析</h3>
        <p>地图空间空间分析相关功能演示</p>
      </router-link>
      
      <router-link to="/vector-draw" class="feature-card">
        <div class="feature-icon">🖱️</div>
        <h3>地图操作</h3>
        <p>地图交互操作功能演示</p>
      </router-link>
      
      <router-link to="/distance-area" class="feature-card">
        <div class="feature-icon">📏</div>
        <h3>测距测面积</h3>
        <p>测量地图上的距离和面积</p>
      </router-link>
      
      <router-link to="/vector-draw" class="feature-card">
        <div class="feature-icon">🎯</div>
        <h3>绘制要素</h3>
        <p>在地图上绘制要素</p>
      </router-link>

    </div>
  </div>
</template>

<script>
export default {
  name: 'HomeView'
}
</script>

<style scoped>
.home-view {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 10px;
  font-size: 2.5em;
}

p {
  text-align: center;
  color: #666;
  margin-bottom: 40px;
  font-size: 1.1em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.feature-card {
  background: white;
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: #2196F3;
}

.feature-icon {
  font-size: 3em;
  margin-bottom: 15px;
}

.feature-card h3 {
  margin: 0 0 10px 0;
  font-size: 1.3em;
  color: #2196F3;
}

.feature-card p {
  margin: 0;
  color: #666;
  font-size: 0.95em;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 2em;
  }
}
</style>